package unicall.em.models;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;

import unicall.em.base.BaseModel;
import unicall.em.dtos.SipAccountDto;

/**
 * SIP分机帐号管理
 * @author jinchaoyang
 */
@Entity
@Table(name="CC_SIP_ACCOUNT")
public class SipAccount extends BaseModel {
    
    
   /**
    * 分机帐号
    */
   private String clientNumber;
   
   /**
    * 分机密码
    */
   private String password;
   
   
   /**
    * 所属坐席
    */
   private String agentId;

   public SipAccount(){
       this.setCreatedAt(new Date());
       this.setUpdatedAt(new Date());
       this.setStatus(STATUS.USE.getValue());
   }

   public String getClientNumber() {
       return clientNumber;
   }

   public void setClientNumber(String clientNumber) {
       this.clientNumber = clientNumber;
   }

   public String getPassword() {
       return password;
   }

   public void setPassword(String password) {
       this.password = password;
   }

   public String getAgentId() {
       return agentId;
   }

   public void setAgentId(String agentId) {
       this.agentId = agentId;
   }
   
   
   public SipAccountDto toDto(){
       SipAccountDto dto = new SipAccountDto();
       dto.setId(this.getId());
       dto.setTenantId(this.getTenantId());
       dto.setClientNumber(this.clientNumber);
       dto.setPassword(this.password);
       dto.setAgentId(this.agentId);
       dto.setCreatedAt(this.getCreatedAt());
       dto.setUpdatedAt(this.getUpdatedAt());
       dto.setOperatorId(this.getOperatorId());
       dto.setCreatorId(this.getCreatorId());
       return dto;
   }
   
   
   
   
}
